package com.payment.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.payment.common.support.Convert;
import com.payment.system.domain.MerchantWallet;
import com.payment.system.mapper.MerchantWalletMapper;
import com.payment.system.service.IMerchantWalletService;

/**
 * 用户资金服务层实现
 * 
 * @author payment
 * @date 2019-11-18
 */
@Service
public class MerchantWalletServiceImpl implements IMerchantWalletService 
{
	@Autowired
	private MerchantWalletMapper merchantWalletMapper;

	/**
	 * 查询用户资金 信息
	 * 
	 * @param id
	 *            用户资金 ID
	 * @return 用户资金 信息
	 */
    @Override
	public MerchantWallet selectMerchantWalletById(String id)
	{
	    return merchantWalletMapper.selectMerchantWalletById(id);
	}
	
	/**
     * 查询用户资金列表
     * 
     * @param merchantWallet 用户资金信息
     * @return 用户资金集合
     */
	@Override
	public List<MerchantWallet> selectMerchantWalletList(MerchantWallet merchantWallet)
	{
	    return merchantWalletMapper.selectMerchantWalletList(merchantWallet);
	}
	
    /**
     * 新增用户资金
     * 
     * @param merchantWallet 用户资金信息
     * @return 结果
     */
	@Override
	public int insertMerchantWallet(MerchantWallet merchantWallet)
	{
	    return merchantWalletMapper.insertMerchantWallet(merchantWallet);
	}
	
	/**
     * 修改用户资金
     * 
     * @param merchantWallet 用户资金信息
     * @return 结果
     */
	@Override
	public int updateMerchantWallet(MerchantWallet merchantWallet)
	{
	    return merchantWalletMapper.updateMerchantWallet(merchantWallet);
	}

	/**
     * 删除用户资金对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteMerchantWalletByIds(String ids)
	{
		return merchantWalletMapper.deleteMerchantWalletByIds(Convert.toStrArray(ids));
	}

	@Override
	public MerchantWallet selectMerchantWalletByMerchantId(String merchantId) {
		// TODO Auto-generated method stub
		return merchantWalletMapper.selectMerchantWalletByMerId(merchantId);
	}

	
}
